package Main;

import java.util.Scanner;

class ArrayUtils{
	private double min;
	private double max;
	static class PairResult{
	private double min;
	private double max;
	@Override
	public String toString() {
		return "PairResult [min=" + min + ", max=" + max + "]";
	}
	public double getMin() {
		return min;
	}
	public void setMin(double min) {
		this.min = min;
	}
	public double getMax() {
		return max;
	}
	public void setMax(double max) {
		this.max = max;
	}	
	}
	PairResult findMinMax(double[] values){
		min=max=values[0];
		for(int i=0;i<values.length;i++){
			if(values[i]>max){
				max=values[i];
			if(values[i]<min)
				min=values[i];		
		}
		return PairResult;
	} 
	
}
public class main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i=0;i<n;i++){
			double[] a = new double[20];
			double b = sc.nextDouble();
			a[i]= b;
			ArrayUtils lc = new ArrayUtils();
			System.out.println(lc.findMinMax(a));
		}
	}
}
